feat(UI): issue related#1221
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements UI improvements for issue and merge request pages, focusing on adding review functionality, refactoring the issue detail page, and implementing "close with comment" features.
- Adds Reviews dropdown functionality to MR pages with new review status filtering
- Completely refactors the issue detail page from Ant Design components to custom UI with improved layout and functionality
- Implements "close with comment" feature that dynamically changes button text based on comment content
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
moon/apps/web/pages/[org]/issue/[id]/index.tsx |
Wraps issue detail page with Primer theme providers |
moon/apps/web/components/SimpleNoteEditor/SimpleNoteContent.tsx |
Adds onChange callback prop and effect to track editor content changes |
moon/apps/web/components/MrView/index.tsx |
Integrates Reviews dropdown with new review filtering functionality |
moon/apps/web/components/Issues/utils/consts.ts |
Adds review status constants for filtering |
moon/apps/web/components/Issues/IssuesContent.tsx |
Fixes comment count display to hide when count is zero |
moon/apps/web/components/Issues/IssueNewPage.tsx |
Exports previously private components for reuse |
moon/apps/web/components/Issues/IssueList.tsx |
Adds new DropdownReview component for review filtering |
moon/apps/web/components/Issues/IssueDetailPage.tsx |
Major refactor from Ant Design to custom UI with enhanced functionality |
| const handleUpdate = () => { | ||
| const html = editor.getHTML() | ||
|
|
||
| onChange?.(html) |
There was a problem hiding this comment.
[nitpick] The optional chaining is unnecessary here since there's already a null check for onChange at line 135. Consider using onChange(html) directly for cleaner code.
| onChange?.(html) | |
| onChange(html) |
| const labelMap = useMemo(() => { | ||
| const map = new Map() | ||
|
|
||
| tags.map((i) => { |
There was a problem hiding this comment.
Using .map() when the return value is not used. Consider using .forEach() instead for better performance and clarity of intent.
| tags.map((i) => { | |
| tags.forEach((i) => { |
|
|
||
| <Stack className='flex-1'> | ||
| <div className='flex h-[100vh] gap-9'> | ||
| <div className='flex w-[70%] flex-col'> |
There was a problem hiding this comment.
[nitpick] Hard-coded percentage width (70%) makes the layout inflexible. Consider using CSS Grid or Flexbox with more semantic proportions like flex-2 and flex-1.
| <div className='flex w-[70%] flex-col'> | |
| <div className='flex flex-2 flex-col'> |
MR 页面增加Reviews
Issue详情页重构
增加issue close with comment功能
修复issue列表评论数量为0时显示bug